const loginPage = [
  {
    path: '/login',
    name: 'login',
    component: () =>
      import(/* webpackChunkName: "Login" */ '../pages/login/Login')
  }
]

/* const screenPage = [
  {
    path: '/screen',
    name: 'screen',
    component: () =>
        import(/!* webpackChunkName: "Login" *!/ '../pages/bigscreen/index.vue')
  }
] */

const housePage = [
  {
    path: '/sixth',
    name: 'sixth',
    component: () =>
      import(/* webpackChunkName: "Login" */ '../pages/main/routes/sixth/Sixth.vue')
  }
]

const mainPage = [
  {
    path: '/',
    redirect: '/login'
  },
  {
    path: '/main',
    name: 'main',
    component: () =>
      import(/* webpackChunkName: "Main" */ '../pages/main/Main'),
    children: [
      {
        path: 'first',
        name: 'first',
        component: () =>
          import(
            /* webpackChunkName: "Second" */ '../pages/main/routes/first/First'
          )
      },
      {
        path: 'second',
        name: 'second',
        component: () =>
          import(
            /* webpackChunkName: "Second" */ '../pages/main/routes/second/Second')
      },
      {
        path: 'third',
        name: 'third',
        component: () =>
          import(
            /* webpackChunkName: "Second" */ '../pages/main/routes/third/Third'
          )
      },
      {
        path: 'forth',
        name: 'forth',
        component: () =>
          import(
            /* webpackChunkName: "Second" */ '../pages/main/routes/forth/Forth'
          )
      },
      {
        path: 'fifth',
        name: 'fifth',
        component: () =>
          import(
            /* webpackChunkName: "Second" */ '../pages/main/routes/fifth/Fifth'
          )
      },
      {
        path: '/sixth',
        name: 'sixth',
        component: () =>
          import(
            /* webpackChunkName: "Second" */ '../pages/main/routes/sixth/Sixth'
          )
      },
      {
        path: 'seventh',
        name: 'seventh',
        component: () =>
          import(
            /* webpackChunkName: "Second" */ '../pages/main/routes/seventh/Seventh'
          )
      },
      {
        path: 'eighth',
        name: 'eighth',
        component: () =>
          import(
            /* webpackChunkName: "Second" */ '../pages/main/routes/eighth/Eighth'
          )
      },
      {
        path: 'ninth',
        name: 'ninth',
        component: () =>
          import(
            /* webpackChunkName: "Second" */ '../pages/main/routes/ninth/Ninth'
          )
      },
      /* {
        path: 'sixth',
        name: 'sixth',
        component: () =>
          import(
            /!* webpackChunkName: "First" *!/ '../pages/main/routes/sixth/Sixth.vue'
          )
      }, */
      {
        path: 'userList',
        name: 'userList',
        component: () =>
          import(
            /* webpackChunkName: "First" */ '../pages/main/routes/users/UserList.vue'
          )
      }
    ]
  }
]

const errorPage = [
  {
    path: '/notFound',
    name: 'notFound',
    component: () =>
      import(/* webpackChunkName: "NotFound" */ '../pages/error/NotFound')
  },
  {
    path: '/forbidden',
    name: 'forbidden',
    component: () =>
      import(/* webpackChunkName: "Forbidden" */ '../pages/error/Forbidden')
  },
  {
    path: '/badGateway',
    name: 'badGateway',
    component: () =>
      import(/* webpackChunkName: "BadGateway" */ '../pages/error/BadGateway')
  },
  {
    path: '*',
    redirect: '/notFound'
  }
]
// 白名单路由定义:src/store/modules/permission/state.js
// 菜单定义：src/store/modules/permission/state.js
// 角色的定义:src/store/modules/role/state.js
// 设置当前用户类型未2，然后设置对应菜单-用户管理
// 创建组件 配置路由 配置菜单
export default [...loginPage, ...mainPage, ...errorPage, ...housePage]
